In certain graphical user interface (GUI) systems, portions of a GUI (a “target area”) may be associated with particular actions. For example, dragging and dropping a graphic element to the top edge of a screen or left half of the screen may result in the element expanding to cover the entire or left half of the screen, respectively.
The boundary of a target area associated with a particular action may be static. For instance, the location of the target area relative to the edges or center of the GUI may be fixed.
The location of a target area may be defined by the location of its boundary. By way of example, a vertical or horizontal rectangular target area may be represented in memory by the x and y pixel coordinates of the area's top left and bottom right corners, and determining whether a location is within the area may include comparing the pixel coordinates of the location to the pixel coordinates of the corners. A circular target area may be represented in memory by the x and y pixel coordinate of its center and its radius, and determining whether a location is within the target area may include determining whether the distance between the location and the center is less than the radius.
If a target area is stored and processed based on the location of its boundary, a complex boundary may require more memory and processing resources than a simple boundary. For instance, if a target area's boundary includes multiple curves and lines meeting at acute and obtuse angles, storing the locations of the curves and lines may require storing many different coordinates. Moreover, determining whether a location is within a target area, or changing the location of the target area itself, based on the location of its boundary may require substantially more processing resources than a rectangular or circular boundary as described above.